package rocket.users;

import java.sql.Connection;
import java.util.List;

import rocket.medical.Treatment;
import rocket.logs.Write;
import rocket.logs.WriteType;
import rocket.server.Access;
/**
 * 
 * @author justin
 * @version
 *
 */
public class Bill extends User {

	private final Access access = Access.BILL;

	private long id;
	
	private String log;
	
	private String birthDate;

	private String city;
	
	private String gender;
	
	private String insurance;
	
	private String name;
	
	private String pharmacy;
	
	private String phone;
	
	private String region;
	
	private Connection con;

	private List<Treatment> treatments;

	public Bill(long id, String birthDate, String city, String gender,
			String insurance, String name, String pharmacy, String phone,
			String region, List<Treatment> treatments) {
		this.id = id;
		this.birthDate = birthDate;
		this.city = city;
		this.gender = gender;
		this.insurance = insurance;
		this.name = name;
		this.pharmacy = pharmacy;
		this.phone = phone;
		this.region = region;
		this.treatments = treatments;
	}

	@Override
	public String birthDate() {
		return birthDate;
	}

	@Override
	public String city() {
		return city;
	}

	@Override
	public String gender() {
		return gender;
	}

	@Override
	public Access getAccess() {
		return access;
	}

	@Override
	public Long getID() {
		return id;
	}

	@Override
	public String insurance() {
		return insurance;
	}

	@Override
	public String name() {
		return name;
	}

	@Override
	public String pharmacy() {
		return pharmacy;
	}

	@Override
	public String phone() {
		return phone;
	}

	@Override
	public List<Treatment> record() {
		return null;
	}

	@Override
	public List<Treatment> record(String date) {
		return null;
	}

	@Override
	public List<Treatment> record(String startDate, String endDate) {
		return null;
	}

	@Override
	public String region() {
		return region;
	}

	@Override
	public void setConnection(Connection con) {
		this.con = con;
	}
	
	public Connection getConnection() {
		return this.con;
	}

	@Override
	public void setID(long id) {
		this.id = id;
		
	}

	@Override
	public void writeLog(String s) {
		// TODO Auto-generated method stub
		new Write(WriteType.USER, s);
	}
	
	public String toString(){
		return name;
	}

	public void setLog(String log) {
		this.log = log;
	}

	public String getLog() {
		return log;
	}
}
